import React, { Component } from 'react'
import './Dialog.css'
export default class Dialog extends Component {
    close = () => {
        this.props.closeDialog()
    }
  render() {
    return (
      <div className='bg'>
        <div className="dialog">
            {/* 头部 */}
            <div className="header">
                <span className="title">{this.props.msg}</span>
                <button className='close' onClick={this.close}>x</button>
            </div>

            {/* 内容 */}
            {this.props.children}

            {/* 底部 */}
            <div className="footer">
                注册登录
            </div>
        </div>
      </div>
    )
  }
}
